package com.jt.demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component //将类交给Spring 容器管理 key="dog" value="反射"
public class Dog implements Pet{

    @Override
    public void hello() {
        System.out.println("旺旺旺旺");
    }
}
